package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by zhangjh on 2016/10/14.
 */
@Entity
@Table(name = "merchant_store_customer")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class MerchantStoreCustomer  extends IDEntityMall {

    @Column(columnDefinition = "bigint comment '核销员ID'")
    private  Long verifyPersonId;

    @Column(columnDefinition = "bigint comment '门店ID'")
    private Long storeId;

    @Column(columnDefinition = "varchar(50) comment '核销员昵称'")
    private String nickName;

    @Column(columnDefinition = "bigint comment '商家ID'")
    private Long merchantId;

    // 门店绑定核销员工
    public static final String REDIS_SAVE_STORE_CUSTOMER_PREFIX = "save_store_customer_";

    public Long getVerifyPersonId() {
        return verifyPersonId;
    }

    public void setVerifyPersonId(Long verifyPersonId) {
        this.verifyPersonId = verifyPersonId;
    }

    public Long getStoreId() {
        return storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    @Override
    public String toString() {
        return "MerchantStoreCustomer{" +
                "verifyPersonId=" + verifyPersonId +
                ", id=" + id +
                ", storeId=" + storeId +
                ", dateCreated=" + dateCreated +
                ", nickName='" + nickName + '\'' +
                ", merchantId=" + merchantId +
                ", lastUpdated=" + lastUpdated +
                ", isDelete=" + isDelete +
                ", version=" + version +
                '}';
    }
}
